home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: news.sprintlink.net!eskimo!scs
- From: scs@eskimo.com (Steve Summit)
- Subject: Re: mixing enums and integers
- X-Nntp-Posting-Host: eskimo.com
- Message-ID: <DKvv4n.Jzw@eskimo.com>
- Sender: news@eskimo.com (News User Id)
- Organization: only when absolutely necessary
- References: <4cij6k$dvb@yrkpa.kias.com> <DKtpIL.72z@eskimo.com> <4cq3v7$q3m@newshost.lanl.gov>
- Date: Mon, 8 Jan 1996 22:14:47 GMT
-
- In article <4cq3v7$q3m@newshost.lanl.gov>, tanmoy@qcd.lanl.gov
- (Tanmoy Bhattacharya) writes:
- > In article <DKtpIL.72z@eskimo.com>, scs@eskimo.com (Steve Summit) writes:
- >|> typedef enum x enum_t;
- >|> enum x {...};
- >
- > ANSI C forbids forward declaration of enums! The first reference to an enum
- > tag _must_ define the members of the enumeration.
-
- Yipes! Tanmoy's right. This is different from the rule for
- struct and union tags, which is (of course) the rule I was
- thinking of. [Lately I've been batting 0.000 on statements which
- I know I ought to verify before posting, but carelessly don't;
- let this be a lesson to you, kids.]
-
- Steve Summit
- scs@eskimo.com
-